<template>
	<view class="content">
		<u-parse :html="content"></u-parse>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				content:'',
			}
		},
		onLoad(opt) {
			this.id = opt.id
			this.getDetailFun()
		},
		methods: {
			getDetailFun(){
				this.$http.getJson('index_newsDetail',{id:this.id}).then(res=>{
					if(res.code == 1){
						this.content = res.data.info.content || ''
						uni.setNavigationBarTitle({
							title:res.data.info.title
						})
					}else{
						this.$m.msg(res.message,()=>{
							this.to_back()
						})
					}
				})
			}
		}
	}
</script>

<style>
	page{
		background: #f6f6f6;
	}
.content{
	padding: 25rpx;
	font-size: 28rpx;
	color: #333;
	line-height: 42rpx;
}
</style>
